1. Field of the Invention
The present invention relates to a digital image processing method, and more particularly to a method of correcting color of a false-color pixel in a digital image.
2. Related Art
Color recognition with human eye is based on a principle that the human eye has three different sensing units for light rays, and different sensing units have different response curves for lights at different wave bands, and the color sensation is achieved through the composite effect of the brain. Generally, we can commonly understand the color decomposition and composite through the RGB three primary color concept.
The working principle of a photosensitive element for a digital camera is not completely the same as the response of the human eye for the RGB lights. The response of the photosensitive element for the spectrum is slightly different from the response of human eye for the spectrum on each component of the RGB light, so definitely, the correction is required. Not only the crossing effect, but also the response strength for each color component must be corrected. The common method is to perform color correction once through a color correction matrix (briefly referred to as CCM below).
The CCM processing flow can be obtained with reference to FIG. 1. Firstly, a group of CCM is set (Step S110). The CCM may be a group of 3*3 pixel matrix or 4*3 pixel matrix, in which the size of the pixel matrix is determined according to a set processing algorithm. The CCM is respectively used in the digital image, such that the CCM is respectively and non-overlappingly used in the digital image (Step S120). Referring to Equation 1, it is a CCM equation.
                              [                                                                      R                  ′                                                                                                      G                  ′                                                                                                      B                  ′                                                              ]                =                              [                                                                                CCM                    11                                                                                        CCM                    12                                                                                        CCM                    13                                                                                                                    CCM                    21                                                                                        CCM                    22                                                                                        CCM                    23                                                                                                                    CCM                    31                                                                                        CCM                    32                                                                                        CCM                    33                                                                        ]                    *                      [                                                            R                                                                              G                                                                              B                                                      ]                                              Equation        ⁢                                  ⁢        1            
R is a red pixel, G is a green pixel, and B is a blue pixel, CCMmn are respectively color correcting parameters, in which m is at the position of the row, and n is at the position of the column, R′ is the red pixel after color correction, G′ is the green pixel after color correction, and B′ is the blue pixel after color correction. Referring to FIGS. 2a and 2b, they are respectively schematic views of a digital image after being processed by CCM. In a raw image 200 in FIG. 2a, each small block represents a pixel 220. A CCM 210 is a dashed-line block, which is assumed that it has a 3*3 pixel size. In FIG. 2b, as for the raw image 200, each pixel 220 is further divided into three pixels with different colors, namely, a red pixel 221, a green pixel 222, and a blue pixel 223. Finally, according to the above operation results, FIG. 2c is a schematic view of a pixel value after the color correction in the conventional art. In a processed image 300, an oblique-line block is a false-color pixel 230. However, after the color correction is performed on the digital image, although the color saturation of the processed image 300 is improved, color spots or color blocks that do not exist in the original actual scene may be generated in the detailed part of the image.
In the conventional art, the false color is eliminated through a Gaussian filter, low-pass filer or other methods. However, in such filter methods, the eliminating motion is performed on all the pixels of the digital image, and although the false color can be eliminated, the color bias of other pixels may be caused accordingly.